package com.lewis.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lewis.dao.PersonDAO;
import com.lewis.jpa.entity.Person;
import com.lewis.service.PersonService;
@Service
public class PersonServiceImpl implements PersonService{

	@Autowired
	private PersonDAO personDAO;
	
	@Override
	@Transactional(value = "transactionManager")
	public void savePerson(Person person) {
		personDAO.savePerson(person);
		
	}

	@Override
	@Transactional(value = "transactionManager")
	public void savePersons(List<Person> persons) {
		personDAO.savePersons(persons);
		
	}

}
